﻿@model IEnumerable<SaleSoft.Models.ds_hotrotructuyen>
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/administrator/Views/Shared/_Layout.cshtml";
}

<div class="bPageTitle">
    <div class="ptBody">
        <div class="content">
            <img src="/s.gif" alt="HoTroTrucTuyen" class="pageTitleIcon" title="HoTroTrucTuyen"><h1 class="pageType">
                Danh sách<span class="titleSeparatingColon">:</span></h1>
            <h2 class="pageDescription">
                Hỗ trợ trực tuyến</h2>
            <div class="blank">
                &nbsp;</div>
        </div>
    </div>
    <div class="ptBreadcrumb">
    </div>
</div>
<div class="hotListElement">
    <div class="bPageBlock secondaryPalette">
        <div class="pbHeader">
             <table border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td class="pbTitle">
                            <img src="/s.gif" alt="" width="1" height="1" class="minWidth" title="">
                        </td>
                        <td class="pbButton">
                            @Html.ActionLink("Thêm mới", "Create", null, new
                       {
                           @class = "btn"
                       })
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="pbBody">
            <div class="pbSubsection">
                @using (Html.BeginForm()) {
                    <table class="detailList" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                @(Html.Telerik().Grid(Model)
                                .Name("grdAdmnGroup")
                                .DataKeys(k => k.Add(c => c.id_hotrotructuyen))
                                .Sortable()
                                .Selectable(selecting => selecting.Enabled(true))
                                .DataBinding(databinding =>
                                {
                                    databinding.Server()
                                        .Select("Index", "HoTroTrucTuyen");
                                })
                                .Editable(editing => editing.Mode(GridEditMode.InLine))
                                 .Columns(col =>
                                 {
                                     col.Bound(o => o.tenhotrotructuyen)
                                         .Title("Tên hiển thị")
                                         .Width(150);
                                     col.Bound(o => o.dienthoaihotrotructuyen)
                                         .Title("Số điện thoại")
                                         .Width(100);
                                     col.Bound(o => o.nickhotrotructuyen)
                                         .Title("Nick name")
                                         .Width(150);
                                     col.Bound(o => o.id_trangthai)
                                         .Title("Trạng thái")
                                         .Width(80);
                                     col.Template(@<div style="text-align:center;">
                                        <a href="/administrator/HoTroTrucTuyen/Edit/@item.id_hotrotructuyen" title="Edit">
                                            <img src="@Href("~/Content/images/icons/pencil.png")" alt="Edit" /></a>
                                        <a href="/administrator/HoTroTrucTuyen/Delete/@item.id_hotrotructuyen" title="Delete" onclick="return confirm('Do you want to delete these data?');">
                                            <img src="@Href("~/Content/images/icons/cross.png")" alt="Delete" /></a></div>)
                                        .Width(80);
                         })
                            .Pageable(paging => paging.Enabled(true).PageSize(20).Style(GridPagerStyles.NextPreviousAndInput))
                            .Resizable(r => r.Columns(true))
                            .Filterable()
                            .Reorderable(r => r.Columns(true))
                            .Groupable()                            
                        )
                            </td>
                        </tr>
                    </table>
                }
            </div>
            <div class="pbFooter secondaryPalette">
                <div class="bg">
                </div>
            </div>
        </div>
    </div>
</div>

